import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        //分割字符串
        String str="123=234=345";
        String[] ret=str.split("=");
        for(int i=0;i<ret.length;i++){
            System.out.println(ret[i]);
        }
    }
    public static void main3(String[] args) {
        String str="asdfcmvabababccet";
        //将字符替换为字符
        String ret1=str.replace('a','c');
        //将字符串替换为字符串
        String ret2=str.replace("ab","kpl");
        //将第一个字符串替换
        String ret3=str.replaceFirst("ab","bb");
        //将字符串替换为字符串
        String ret4=str.replaceAll("ab","kpl");
        System.out.println(ret1);
        System.out.println(ret2);
        System.out.println(ret3);
        System.out.println(ret4);
    }
    public static void main2(String[] args) {
        //将字符串转为数组
        String str="abciit";
        char[] ss=str.toCharArray();
        System.out.println(Arrays.toString(ss));
        //格式化输出
        String ret=String.format("%d-%d-%d",2024,8,7);
        System.out.println(ret);
    }
    public static void main1(String[] args) {
        String str="Abcdef";
        int s=123;
        //将字母全部转换为小写
        System.out.println(str.toLowerCase());
        //将字母全部转换为大写
        System.out.println(str.toUpperCase());
        //将s转换为字符串
        String str1=String.valueOf(s);
        System.out.println(str1);
        //将“123”转换为int类型
        int h=Integer.valueOf("123");
        System.out.println(h);
    }
}